<?php

require_once 'MagicBean.php';

class Response extends MagicBean{
	
	private $_tpl;
	public $menus = array();
	
	public function setTpl($tpl) {
		$this->_tpl = $tpl;
	}
	
	public function getTpl() {
		return $this->_tpl;
	}	
	
	public function tpl($tpl) {
	    
	    $args = func_get_args();
	    
	    if (count($args) == 0) {
	        return  $this->_tpl;
	    } else {
	        $this->_tpl = $args[0];
	    }
	}
	
	function set ($name, $value) {
		
		$this->params[$name] = $value;
		
	}
	
	function append ($name, $value) {
	
		if (!isset($this->params[$name])) {
			$this->params[$name] = $value;
			return;
		}
		
		$this->params[$name] .= $value;
	
	}	
	
	public function get($name) {
		
		if (isset($this->params[$name])) {
			return $this->params[$name];
		}
		
		return null;
	}
	
	public function getParams() {
		return $this->params;
	}
	
}



?>
